package Iterator_Pattern.Ye;

import java.util.ArrayList;
import java.util.List;

// -*-coding:utf-8 -*-
//人员：刘陆鑫
//班级：19软3
//学号；2019110218
public abstract class AbstractObjectList {
    protected List<Object> objects=new ArrayList<Object>();
    public AbstractObjectList(List<Object>objects){
        this.objects=objects;
    }
    public void addObject(Object obj) {
        this.objects.add(obj);
    }
    public void removeObject(Object obj){
        this.objects.remove(obj);
    }
    public List<Object> getObjects() {
        return this.objects;
    }
    public abstract AbstractIterator createIterator();
}
